<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorate="layout">
	<!-- data-layout-decorator="pages/test"> -->

	<head>
		<meta charset="UTF-8" />
		<title>RA-网络安全风险评估系统</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

		<link href="/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
		<link href="/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" />

		<link href="/css/jquery.mmenu.css" rel="stylesheet" />

		<link href="/css/style.css" rel="stylesheet" />
		<link href="/css/add-ons.min.css" rel="stylesheet" />

		<style type="text/css">
			html,
			body,
			.mm-page,
			.mm-page .content,
			#iframeDiv,
			.mm-page .content .row,
			#iframeDiv iframe {
				width: 100%;
				height: 100%;
				overflow: hidden;
			}
			
			#iframeDiv {
				padding: 140px 37px 38px 278px;
				overflow: auto;
			}
			
			.nav>li:hover {
				background-color: #FFF;
			}
		</style>
	</head>

	<body>
		<div class="navbar" role="navigation">
			<div class="sidebar" style="height: auto;">
				<div class="sidebar-collapse">
					<div class="sidebar-header">
						<img src="/img/logo.png" class="img-responsive" alt="" />
					</div>
				</div>
			</div>

			<div class="container-fluid container-nav">
				<div class="navbar-right">
					<div class="userbox">
						<a th:href="@{/logout}"><span class="name">登出系统</span></a>
					</div>
				</div>
			</div>
		</div>

		<div class="container-fluid content">
			<div class="page-header">
				<div class="pull-left">
					<ol class="breadcrumb visible-sm visible-md visible-lg">
						<li>
							<a th:href="@{/goHome}"><i class="icon fa fa-home"></i>首页</a>
						</li>
						<li id="pageName">资产赋值</li>
					</ol>
				</div>
			</div>

			<div class="row" th:fragment="content">
				<div class="sidebar">
					<div class="sidebar-collapse">
						<div class="sidebar-header">
							<div class="img-responsive"></div>
						</div>
						<div style="overflow-y: scroll;overflow-x:hidden;width: 270px;">
							<nav id="menu" class="nav-main" role="navigation">
								<ul class="nav nav-sidebar" th:if="${menuList?.size() != 0}">
									<li th:each="me,iterState:${menuList}">
										<a th:attr="href='/pro/pageLink/'+${projectId}+'/'+${groupArr}+'/'+${me.id}">
											<i class="fa fa-laptop" aria-hidden="true"></i>
											<span th:text="${me.name}">菜单项</span>
										</a>
									</li>
								</ul>
							</nav>
						</div>
					</div>
					<div class="sidebar-footer" style="display: none;"></div>
				</div>

				<div id="iframeDiv">
					<div id='iframe' frameborder="no" border="0" scrolling="yes" allowtransparency="yes">

						<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
							<form th:action="@{/pro/setImportance}" method="POST" enctype="multipart/form-data" 
									class="col-md-4 alert alert-danger" style="padding: 8px 0px;margin-left:-15px;min-width:360px;">
								<label class="col-md-3 control-label label_left" for="file-input" style="margin-top:10px;min-width:134px;">重要资产标准：</label>
								<div class="col-md-6" style="margin-left:-30px">
									<input type="text" th:attr="value=${projectId}" name="projectId" style="display:none;"/>
									<input type="text" th:attr="value=${groupArr}" name="groupIds" style="display:none;"/>
									<input type="text" name="currMenuId" value="3" style="display:none;"/>
									<input type="text" class="form-control" name="importance" />
								</div>
								<button class="col-md-2 btn btn-primary button_right" id="select_file" style="padding:6px 6px;min-width:20px;">设置</button>
							</form>

							<form th:if="${impAssetGroups?.size()!=0}" th:action="@{/ass/evaluation}" method="POST" enctype="multipart/form-data" 
									class="col-md-4 alert alert-danger" style="padding: 8px 0px;margin-left:15px;min-width:410px;"> 
								<label class="col-md-3 control-label label_left" for="upload_file" style="margin-top:10px;min-width:123px;">上传资产文件：</label>
								<div class="col-md-7" style="margin-left:-30px">
									<input type="text" th:attr="value=${projectId}" name="upProjectId" style="display:none;"/>
									<input name="upFile" type="file" class="form-control" id="upload_file" style="display: none;" onchange="change();" />
									<input type="text" class="form-control" id="upload_file_tmp" name="upload_file_tmp" readonly="readonly" onclick="upload_file.click(); " />
								</div>
								<button class="col-md-2 btn btn-primary button_right" id="select_file" style="padding:6px 6px;">上传</button>
							</form>

							<form th:if="${impAssetGroups?.size()!=0}" th:action="@{/ass/exportExcel}">
								<div class="col-md-2">
									<div class="alert alert-danger" style="margin-right:-15px;" onclick="downBtn.click()">
										<input type="text" th:attr="value=${projectId}" name="projectId" style="display:none;"/>
										<span class="name">下载重要资产文件</span>
										<button style="display:none;" id="downBtn"></button>
									</div>
								</div>
							</form>
						</div>
							
						<div class="sidebar-minified">
							<div class="row">
							
								<div th:if="${impAssetGroups?.size() != 0}" th:each="impAsset : ${impAssetGroups}" class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
									
									<!--硬件资产-->
									<div th:if="${impAsset?.key} == '硬件资产'" id="hardware" class="panel panel-default bk-bg-white">
										<div class="panel-heading bk-bg-white">
											<h6>
												<i class="fa fa-table red" style="width:auto;"></i><span class="break"></span>
												<span th:text="'重要资产赋值表--'+${impAsset?.key}">Default</span>
											</h6>
											<div class="panel-actions">
												<a href="#" class="addToTable"><i class="fa fa-plus" style="color:#ff5454"></i></a>
												<a href="#" class="btn-minimize"><i class="fa fa-caret-up" style="color:#ff5454"></i></a>
											</div>
										</div>
										<div class="panel-body">
											<!-- <div class="row">
												<div class="col-sm-6">
													<div class="bk-margin-bottom-10">
														<button id="addToTable" class="btn btn-info">Add <i class="fa fa-plus"></i></button>
													</div>
												</div>
											</div> -->
											<table class="table table-bordered table-striped mb-none" id="datatable-editable">
												<thead>
													<tr>
														<th>序号</th>
														<th>资产名称</th>
														<th>责任人</th>
														<th>机密性等级</th>
														<th>完整性等级</th>
														<th>可用性等级</th>
														<th>重要程度</th>
														<th>部门</th>
														<th>操作</th>
													</tr>
												</thead>
												<tbody th:each="tr , itemState : ${impAsset.value}">
													<tr th:each="td : ${tr}" class="gradeA">
														<td class="numerical" th:text="${itemState.count}">序号</td>
														<td th:text="${tr?.name}">资产名称</td>
														<td th:text="${tr?.principle}">责任人</td>
														<td th:text="${tr?.integrity}">机密性等级</td>
														<td th:text="${tr?.confidentiality}">完整性等级</td>
														<td th:text="${tr?.availability}">可用性等级</td>
														<td th:text="${tr?.importance}">重要程度</td>
														<td th:text="${tr?.depart}">部门</td>
														<td class="actions">
															<a href="#" class="hidden on-editing save-row"><i class="fa fa-save"></i></a>
															<a href="#" class="hidden on-editing cancel-row"><i class="fa fa-times"></i></a>
															<a href="#" class="on-default edit-row"><i class="fa fa-pencil"></i></a>
															<a href="#" class="on-default remove-row"><i class="fa fa-trash-o"></i></a>
														</td>
													</tr>
												</tbody>
											</table>
										</div>
									</div>

									<!--文档和数据-->
									<div th:if="${impAsset?.key} == '文档和数据'" id="hardware" class="panel panel-default bk-bg-white">
										<div class="panel-heading bk-bg-white">
											<h6>
												<i class="fa fa-table red" style="width:auto;"></i><span class="break"></span>
												<span th:text="重要资产赋值表--文档与数据">Default</span>
											</h6>
											<div class="panel-actions">
												<a href="#" class="addToTable"><i class="fa fa-plus" style="color:#ff5454"></i></a>
												<a href="#" class="btn-minimize"><i class="fa fa-caret-up" style="color:#ff5454"></i></a>
											</div>
										</div>
										<div class="panel-body">
											<table class="table table-bordered table-striped mb-none" id="datatable-editable">
												<thead>
													<tr>
														<th>序号</th>
														<th>资产名称</th>
														<th>责任人</th>
														<th>应用描述</th>
														<th>机密性等级</th>
														<th>完整性等级</th>
														<th>可用性等级</th>
														<th>重要程度</th>
														<th>部门</th>
														<th>操作</th>
													</tr>
												</thead>
												<tbody th:each="tr , itemState: ${impAsset.value}">
													<tr th:each="td : ${tr}" class="gradeA">
														<td class="numerical" th:text="${itemState.count}">序号</td>
														<td th:text="${tr?.name}">资产名称</td>
														<td th:text="${tr?.principle}">责任人</td>
														<td th:text="${tr?.description}">应用描述</td>
														<td th:text="${tr?.integrity}">机密性等级</td>
														<td th:text="${tr?.confidentiality}">完整性等级</td>
														<td th:text="${tr?.availability}">可用性等级</td>
														<td th:text="${tr?.importance}">重要程度</td>
														<td th:text="${tr?.depart}">部门</td>
														<td class="actions">
															<a href="#" class="hidden on-editing save-row"><i class="fa fa-save"></i></a>
															<a href="#" class="hidden on-editing cancel-row"><i class="fa fa-times"></i></a>
															<a href="#" class="on-default edit-row"><i class="fa fa-pencil"></i></a>
															<a href="#" class="on-default remove-row"><i class="fa fa-trash-o"></i></a>
														</td>
													</tr>
												</tbody>
											</table>
										</div>
									</div>

									<!--人力资源-->
									<div th:if="${impAsset?.key} == '人力资源'" id="hardware" class="panel panel-default bk-bg-white">
										<div class="panel-heading bk-bg-white">
											<h6>
												<i class="fa fa-table red" style="width:auto;"></i><span class="break"></span>
												<span th:text="'重要资产赋值表--'+${impAsset?.key}">Default</span>
											</h6>
											<div class="panel-actions">
												<a href="#" class="addToTable"><i class="fa fa-plus" style="color:#ff5454"></i></a>
												<a href="#" class="btn-minimize"><i class="fa fa-caret-up" style="color:#ff5454"></i></a>
											</div>
										</div>
										<div class="panel-body">
											<table class="table table-bordered table-striped mb-none" id="datatable-editable">
												<thead>
													<tr>
														<th>序号</th>
														<th>岗位</th>
														<th>岗位描述</th>
														<th>姓名</th>
														<th>机密性等级</th>
														<th>完整性等级</th>
														<th>可用性等级</th>
														<th>重要性程度</th>
														<th>部门</th>
														<th>操作</th>
													</tr>
												</thead>
												<tbody th:each="tr , itemState: ${impAsset.value}">
													<tr th:each="td : ${tr}" class="gradeA">
														<td class="numerical" th:text="${itemState.count}">序号</td>
														<td th:text="${tr?.name}">岗位</td>
														<td th:text="${tr?.description}">岗位描述</td>
														<td th:text="${tr?.principle}">姓名</td>
														<td th:text="${tr?.integrity}">机密性等级</td>
														<td th:text="${tr?.confidentiality}">完整性等级</td>
														<td th:text="${tr?.availability}">可用性等级</td>
														<td th:text="${tr?.importance}">重要性程度</td>
														<td th:text="${tr?.depart}">部门</td>
														<td class="actions">
															<a href="#" class="hidden on-editing save-row"><i class="fa fa-save"></i></a>
															<a href="#" class="hidden on-editing cancel-row"><i class="fa fa-times"></i></a>
															<a href="#" class="on-default edit-row"><i class="fa fa-pencil"></i></a>
															<a href="#" class="on-default remove-row"><i class="fa fa-trash-o"></i></a>
														</td>
													</tr>
												</tbody>
											</table>
										</div>
									</div>

									<!--业务应用-->
									<div th:if="${impAsset?.key} == '业务应用'" id="manpower" class="panel panel-default bk-bg-white">
										<div class="panel-heading bk-bg-white">
											<h6>
												<i class="fa fa-table red" style="width:auto;"></i><span class="break"></span>
												<span th:text="'重要资产赋值表--'+${impAsset?.key}">Default</span>
											</h6>
											<div class="panel-actions">
												<a href="#" class="addToTable"><i class="fa fa-plus" style="color:#ff5454"></i></a>
												<a href="#" class="btn-minimize"><i class="fa fa-caret-up" style="color:#ff5454"></i></a>
											</div>
										</div>
										<div class="panel-body">
											<table class="table table-bordered table-striped mb-none" id="datatable-editable">
												<thead>
													<tr>
														<th>序号</th>
														<th>资产名称</th>
														<th>使用范围描述</th>
														<th>机密性等级</th>
														<th>完整性等级</th>
														<th>可用性等级</th>
														<th>重要性程度</th>
														<th>部门</th>
														<th>操作</th>
													</tr>
												</thead>
												<tbody th:each="tr , itemState: ${impAsset.value}">
													<tr th:each="td : ${tr}" class="gradeA">
														<td class="numerical" th:text="${itemState.count}">序号</td>
														<td th:text="${tr?.name}">资产名称</td>
														<td th:text="${tr?.description}">使用范围描述</td>
														<td th:text="${tr?.integrity}">机密性等级</td>
														<td th:text="${tr?.confidentiality}">完整性等级</td>
														<td th:text="${tr?.availability}">可用性等级</td>
														<td th:text="${tr?.importance}">重要性程度</td>
														<td th:text="${tr?.depart}">部门</td>
														<td class="actions">
															<a href="#" class="hidden on-editing save-row"><i class="fa fa-save"></i></a>
															<a href="#" class="hidden on-editing cancel-row"><i class="fa fa-times"></i></a>
															<a href="#" class="on-default edit-row"><i class="fa fa-pencil"></i></a>
															<a href="#" class="on-default remove-row"><i class="fa fa-trash-o"></i></a>
														</td>
													</tr>
												</tbody>
											</table>
										</div>
									</div>

									<!--物理环境-->
									<div th:if="${impAsset?.key} == '物理环境'" id="manpower" class="panel panel-default bk-bg-white">
										<div class="panel-heading bk-bg-white">
											<h6>
												<i class="fa fa-table red" style="width:auto;"></i><span class="break"></span>
												<span th:text="'重要资产赋值表--'+${impAsset?.key}">Default</span>
											</h6>
											<div class="panel-actions">
												<a href="#" class="addToTable"><i class="fa fa-plus" style="color:#ff5454"></i></a>
												<a href="#" class="btn-minimize"><i class="fa fa-caret-up" style="color:#ff5454"></i></a>
											</div>
										</div>
										<div class="panel-body">
											<table class="table table-bordered table-striped mb-none" id="datatable-editable">
												<thead>
													<tr>
														<th>序号</th>
														<th>资产名称</th>
														<th>使用范围描述</th>
														<th>机密性等级</th>
														<th>完整性等级</th>
														<th>可用性等级</th>
														<th>重要性程度</th>
														<th>部门</th>
														<th>操作</th>
													</tr>
												</thead>
												<tbody th:each="tr , itemState: ${impAsset.value}">
													<tr th:each="td : ${tr}" class="gradeA">
														<td class="numerical" th:text="${itemState.count}">序号</td>
														<td th:text="${tr?.name}">资产名称</td>
														<td th:text="${tr?.description}">使用范围描述</td>
														<td th:text="${tr?.integrity}">机密性等级</td>
														<td th:text="${tr?.confidentiality}">完整性等级</td>
														<td th:text="${tr?.availability}">可用性等级</td>
														<td th:text="${tr?.importance}">重要性程度</td>
														<td th:text="${tr?.depart}">部门</td>
														<td class="actions">
															<a href="#" class="hidden on-editing save-row"><i class="fa fa-save"></i></a>
															<a href="#" class="hidden on-editing cancel-row"><i class="fa fa-times"></i></a>
															<a href="#" class="on-default edit-row"><i class="fa fa-pencil"></i></a>
															<a href="#" class="on-default remove-row"><i class="fa fa-trash-o"></i></a>
														</td>
													</tr>
												</tbody>
											</table>
										</div>
									</div>

									<!--其他-->
									<div th:if="${impAsset?.key} == '其他'" id="manpower" class="panel panel-default bk-bg-white">
										<div class="panel-heading bk-bg-white">
											<h6>
												<i class="fa fa-table red" style="width:auto;"></i><span class="break"></span>
												<span th:text="'重要资产赋值表--'+${impAsset?.key}">Default</span>
											</h6>
											<div class="panel-actions">
												<a href="#" class="addToTable"><i class="fa fa-plus" style="color:#ff5454"></i></a>
												<a href="#" class="btn-minimize"><i class="fa fa-caret-up" style="color:#ff5454"></i></a>
											</div>
										</div>
										<div class="panel-body">
											<table class="table table-bordered table-striped mb-none" id="datatable-editable">
												<thead>
													<tr>
														<th>序号</th>
														<th>资产名称</th>
														<th>使用范围描述</th>
														<th>机密性等级</th>
														<th>完整性等级</th>
														<th>可用性等级</th>
														<th>重要性程度</th>
														<th>部门</th>
														<th>操作</th>
													</tr>
												</thead>
												<tbody th:each="tr , itemState: ${impAsset.value}">
													<tr th:each="td : ${tr}" class="gradeA">
														<td class="numerical" th:text="${itemState.count}">序号</td>
														<td th:text="${tr?.name}">资产名称</td>
														<td th:text="${tr?.description}">使用范围描述</td>
														<td th:text="${tr?.integrity}">机密性等级</td>
														<td th:text="${tr?.confidentiality}">完整性等级</td>
														<td th:text="${tr?.availability}">可用性等级</td>
														<td th:text="${tr?.importance}">重要性程度</td>
														<td th:text="${tr?.depart}">部门</td>
														<td class="actions">
															<a href="#" class="hidden on-editing save-row"><i class="fa fa-save"></i></a>
															<a href="#" class="hidden on-editing cancel-row"><i class="fa fa-times"></i></a>
															<a href="#" class="on-default edit-row"><i class="fa fa-pencil"></i></a>
															<a href="#" class="on-default remove-row"><i class="fa fa-trash-o"></i></a>
														</td>
													</tr>
												</tbody>
											</table>
										</div>
									</div>

								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<script src="/vendor/js/jquery-2.1.1.min.js"></script>
		<script src="/vendor/bootstrap/js/bootstrap.min.js"></script>

		<script src="/plugins/select2/select2.js"></script>
		<script src="/plugins/jquery-datatables/media/js/jquery.dataTables.js"></script>
		<script src="/plugins/jquery-datatables-bs3/js/datatables.js"></script>

		<script src="/js/jquery.mmenu.min.js"></script>
		<script src="/js/core.min.js"></script>

		<script src="/js/table-editable.js"></script>
		<script src="/pagesJs/table.js"></script>
	</body>

</html>